home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / Exploit and vulnerability / w00w00 / misc / shokdial / animation / intro1.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-13  |  914 b   |  51 lines

  1. #include <stdio.h>
  2. #include <time.h>
  3. #include <signal.h>
  4. #include "colors.h"
  5.  
  6. #define TIME 100000
  7.  
  8. void sighandler(int signum);
  9.  
  10. void main()
  11. {
  12.   char buf[15];
  13.   char space[40];
  14.   int i;
  15.  
  16.   bzero(buf,   sizeof(buf));
  17.   bzero(space, sizeof(space));
  18.  
  19.   sprintf(space, " ");
  20.   sprintf(buf, "%sS %sH %sO %sK %sD %sI %sA %sL", 
  21.       PINK, BOLDCYAN, BOLDGREEN, BOLDRED,
  22.       BOLDBLUE, BOLDRED, BOLDGREEN, BOLDCYAN);
  23.  
  24.   signal(SIGALRM, sighandler);
  25.   signal(SIGINT,  sighandler);
  26.   signal(SIGQUIT, sighandler);
  27.   signal(SIGTSTP, sighandler);
  28.  
  29.   alarm(5);
  30.   for (i = 0; i < 28; i++) {
  31.      if (i == 27) {
  32.         printf("%sw00w00!\n", NORMAL);
  33.         exit(0);
  34.      }
  35.      printf("%s%s\r", space, buf);
  36.      fflush(stdout);
  37.      usleep(TIME);
  38.      strncat(space, " ", sizeof(space));
  39.   }
  40.   alarm(0);
  41.  
  42.   printf("%sw00w00!\n", NORMAL);
  43. }
  44.  
  45. void sighandler(int signum)
  46. {
  47.   printf("%s", NORMAL);
  48.   printf("w00w00!\n");
  49.   exit(0);
  50. }
  51.